<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/Common Module/log.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_df4e0e4e72f77ab290fd1a24f190250a.html">Common Module</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">log.h</div></div>
</div><!--header-->
<div class="contents">
<a href="log_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#ifndef __LOG_H__</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#define __LOG_H__</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#include &quot;SWM341.h&quot;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="log_8h.html#aa7a913a3a862165d0a8f2434ece70ca0">   29</a></span><span class="preprocessor">#define USE_LOG</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="comment">/*</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span><span class="comment"> * 也可以转用 SWM341.h 内的</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="comment"> * #define SW_LOG_ERR(...)</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="comment"> * #define SW_LOG_WARN(...)</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment"> * #define SW_LOG_INFO(...)</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span><span class="comment"> * 输出打印级别设定</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="comment"> * #define SW_LOG_LEVEL        0</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span><span class="comment"> */</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="preprocessor">#ifdef  USE_LOG</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="log_8h.html#a378e28bfcb78d17285210d6bbb70a083">   42</a></span><span class="preprocessor">    #define LOG_INFO(...)       do {                                                                                           \</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="preprocessor">                                    printf(&quot;\r\n &gt;&gt;&gt;&gt;&gt;&gt; log:(line-%d) [%s]: &lt;&lt;&lt;&lt;&lt;&lt; \r\n&quot;</span>, __LINE__, __FUNCTION__); \</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>                                    printf(__VA_ARGS__);                                                                       \</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>                                } while (0)</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"><a class="line" href="log_8h.html#add82efa459e0af380b68522c29b9fd44">   48</a></span><span class="preprocessor">    #define LOG_WARN(...)       do {                                                                                           \</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span><span class="preprocessor">                                    printf(&quot;\r\n &gt;&gt;&gt;&gt;&gt;&gt; warn:(line-%d) [%s]: &lt;&lt;&lt;&lt;&lt;&lt; \r\n&quot;</span>, __LINE__, __FUNCTION__); \</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>                                    printf(__VA_ARGS__);                                                                       \</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span>                                } while (0)</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="log_8h.html#ad4a9117ce894e3319e903142347a0f63">   54</a></span><span class="preprocessor">    #define LOG_ERROR(...)      do {                                                                                            \</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">                                    printf(&quot;\r\n &gt;&gt;&gt;&gt;&gt;&gt; error:(line-%d) [%s]: &lt;&lt;&lt;&lt;&lt;&lt; \r\n&quot;</span>, __LINE__, __FUNCTION__); \</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>                                    printf(__VA_ARGS__);                                                                        \</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>                                } while (0)</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="preprocessor">    #define LOG_INFO(...)</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="preprocessor">    #define LOG_WARN(...)</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">    #define LOG_ERROR(...)</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span><span class="keywordtype">void</span> <a class="code hl_function" href="log_8h.html#afe12af7fba29f5c026af71dfca1d1ff9">lvgl_show_error</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *text);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="preprocessor">#endif </span><span class="comment">//__LOG_H__</span></div>
<div class="ttc" id="alog_8h_html_afe12af7fba29f5c026af71dfca1d1ff9"><div class="ttname"><a href="log_8h.html#afe12af7fba29f5c026af71dfca1d1ff9">lvgl_show_error</a></div><div class="ttdeci">void lvgl_show_error(const char *text)</div><div class="ttdoc">应用 label 控件在屏幕上显示错误告警</div><div class="ttdef"><b>Definition:</b> <a href="log_8c_source.html#l00032">log.c:32</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
